package com.bite.lesson4;

import java.util.Scanner;

public class Demo_02 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()) {
            int n = scanner.nextInt();
            print(n);
            System.out.println();
        }
    }

    private static void print(int n) {
        if (n < 10) {
            System.out.print(n + " ");
        } else {
            print(n / 10);
            System.out.print(n % 10 + " ");
        }
    }
}
